home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / buildPreferenceMenu.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  3.7 KB  |  137 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Procedure Name:
  19. //      buildPreferenceMenu
  20. //
  21. //  Description:
  22. //        Create the UI Elements menu
  23. //
  24. //  Input Arguments:
  25. //      parent to parent the menu to.
  26. //
  27. //  Return Value:
  28. //      None.
  29. //
  30.  
  31. global proc buildPreferenceMenu ( string $parent ) {
  32.  
  33.     //    Clear out all menu items, and rebuild
  34.     //    the menu to keep the menu in sync across
  35.     //    the different Maya UI
  36.     //
  37.     if( `menu -q -ni $parent` != 0 ) {
  38.         //
  39.         //  Menu is built already - just return
  40.         //
  41.         updatePrefsMenu;
  42.         return;
  43.     }
  44.  
  45.     setParent -m $parent;
  46.  
  47.     //  
  48.     //  Create menu items
  49.     //
  50.     menuItem -label "Status Line"
  51.         -checkBox true
  52.         -annotation (getRunTimeCommandAnnotation("ToggleStatusLine"))
  53.         -command "ToggleStatusLine"
  54.         statusLineItem;
  55.  
  56.     menuItem -label "Shelf"
  57.         -checkBox true 
  58.         -annotation (getRunTimeCommandAnnotation("ToggleShelf"))
  59.         -command "ToggleShelf"
  60.         shelfItem;
  61.  
  62.     menuItem -label "Time Slider" 
  63.         -checkBox true 
  64.         -annotation (getRunTimeCommandAnnotation("ToggleTimeSlider"))
  65.         -command "ToggleTimeSlider"
  66.         timelineItem;
  67.  
  68.     menuItem -label "Range Slider" 
  69.         -enable true
  70.         -checkBox true
  71.         -annotation (getRunTimeCommandAnnotation("ToggleRangeSlider"))
  72.         -command "ToggleRangeSlider"
  73.         playbackRangeItem;
  74.  
  75.     menuItem -label "Command Line" 
  76.         -checkBox true 
  77.         -annotation (getRunTimeCommandAnnotation("ToggleCommandLine"))
  78.         -command "ToggleCommandLine"
  79.         commandLineItem;
  80.  
  81.     menuItem -label "Help Line" 
  82.         -checkBox true 
  83.         -annotation (getRunTimeCommandAnnotation("ToggleHelpLine"))
  84.         -command "ToggleHelpLine"
  85.         helpLineItem;
  86.  
  87.     menuItem -divider true;
  88.  
  89.     menuItem -label "Toolbox" 
  90.         -checkBox true 
  91.         -annotation (getRunTimeCommandAnnotation("ToggleToolbox"))
  92.         -command "ToggleToolbox"
  93.         toolboxItem;
  94.  
  95.     menuItem -divider true;
  96.  
  97.     menuItem -label "Attribute Editor"
  98.         -checkBox true 
  99.         -annotation (getRunTimeCommandAnnotation("ToggleAttributeEditor"))
  100.         -command "ToggleAttributeEditor"
  101.         attrEditorItem;
  102.  
  103.     menuItem -label "Tool Settings"
  104.         -checkBox true 
  105.         -annotation (getRunTimeCommandAnnotation("ToggleToolSettings"))
  106.         -command "ToggleToolSettings"
  107.         toolSettingsItem;
  108.  
  109.     menuItem -label "Channel Box / Layer Editor"
  110.         -checkBox true 
  111.         -annotation (getRunTimeCommandAnnotation("ToggleChannelsLayers"))
  112.         -command "ToggleChannelsLayers"
  113.         channelsLayersItem;
  114.  
  115.     menuItem -divider true;
  116.  
  117.     menuItem -label "Hide UI Elements" 
  118.         -annotation (getRunTimeCommandAnnotation("HideUIElements"))
  119.         -command "HideUIElements";
  120.  
  121.     menuItem -label "Show UI Elements" 
  122.         -annotation (getRunTimeCommandAnnotation("ShowUIElements"))
  123.         -command "ShowUIElements";
  124.  
  125.     menuItem -label "Restore UI Elements" 
  126.         -annotation (getRunTimeCommandAnnotation("RestoreUIElements"))
  127.         -command "RestoreUIElements";
  128.  
  129.     setParent -menu ..;
  130.  
  131.     //    Run the proc that keeps the checkboxes in sync
  132.     //    with what decorations on Maya's windows are shown
  133.     //    or not shown
  134.     //
  135.     updatePrefsMenu;
  136. }
  137.